<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'DejaVu Sans'; font-size:11pt; font-weight:400; font-style:normal;">
<html>

<div class="entry-header" style="box-sizing: border-box; text-align: var(--textalign,center); --textalign: left; margin-top: 60px; margin-bottom: var(--spacing,60px); color: rgb(39, 38, 38); font-family: Arial, Helvetica, sans-serif, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div class="nv-title-meta-wrap" style="box-sizing: border-box;"><h1 class="title entry-title" style="box-sizing: border-box; margin: 0px 0px 10px; padding: 0px; font-size: var(--fontsize,var(--h1fontsize)); font-weight: var(--fontweight,var(--h1fontweight)); font-family: var(--headingsfontfamily),var(--nv-fallback-ff);  letter-spacing: var(--letterspacing,var(--h1letterspacing)); text-transform: var(--texttransform,var(--h1texttransform)); overflow-wrap: break-word;">VBA Excel. Первая функция (для начинающих)</h1><ul class="nv-meta-list" style="box-sizing: border-box; margin: 0px 0px 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: var(--listpad,0); list-style: var(--liststyle,none); font-size: 0.9em; --avatarsize: 20px;"></ul></div></div><div class="nv-content-wrap entry-content" style="box-sizing: border-box; counter-reset: footnotes 0; --listpad: 20px; --liststyle: disc; --img-m: 24px; margin-bottom: var(--spacing,60px); color: rgb(39, 38, 38); font-family: Arial, Helvetica, sans-serif, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; height: auto !important;"><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;"><em style="box-sizing: border-box;">Пример создания простейшей функции на VBA Excel для начинающих программировать с нуля. Вставка пользовательской функции на рабочий лист с помощью мастера.</em><span id="more-3415" style="box-sizing: border-box;"></span></p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px; text-align: right;"><em style="box-sizing: border-box;"><strong style="box-sizing: border-box;">Начинаем программировать с нуля</strong><br style="box-sizing: border-box;">Часть 2. Первая функция<br style="box-sizing: border-box;">[<a href="https://vremya-ne-zhdet.ru/vba-excel/nachinayem-programmirovat-s-nulya/" style="box-sizing: border-box; --linkdeco: underline; color: var(--nv-primary-accent); cursor: pointer; text-decoration: var(--linkdeco);">Часть 1</a>] [Часть 2] [<a href="https://vremya-ne-zhdet.ru/vba-excel/pervaya-knopka/" style="box-sizing: border-box; --linkdeco: underline; color: var(--nv-primary-accent); cursor: pointer; text-decoration: var(--linkdeco);">Часть 3</a>] [<a href="https://vremya-ne-zhdet.ru/vba-excel/pervaya-forma/" style="box-sizing: border-box; --linkdeco: underline; color: var(--nv-primary-accent); cursor: pointer; text-decoration: var(--linkdeco);">Часть 4</a>]</em></p><div class="lwptoc lwptoc-autoWidth lwptoc-baseItems lwptoc-light lwptoc-notInherit" data-smooth-scroll="1" data-smooth-scroll-offset="24" data-lwptoc-initialized="1" style="box-sizing: border-box; margin: 32px 0px;"><div class="lwptoc_i" style="box-sizing: border-box; padding: 14px 18px 18px; text-align: left; display: inline-block; color: rgb(51, 51, 51); background: rgb(250, 250, 250);"><div class="lwptoc_header" style="box-sizing: border-box; margin-bottom: 6px;"><b class="lwptoc_title" style="box-sizing: border-box; font-weight: 600;">Содержание</b></div><div class="lwptoc_items lwptoc_items-visible" style="box-sizing: border-box; font-size: 14.4px;"><div class="lwptoc_itemWrap" style="box-sizing: border-box;"><div class="lwptoc_item" style="box-sizing: border-box; margin-top: 0px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/pervaya-funktsiya/#Vvodnaa_informacia" style="box-sizing: border-box; --linkdeco: underline; color: rgb(49, 117, 228); cursor: pointer; text-decoration: none !important; box-shadow: none !important; border: none !important;"><span class="lwptoc_item_number" style="box-sizing: border-box; margin-right: 2px;">1.</span><span> </span><span class="lwptoc_item_label" style="box-sizing: border-box;">Вводная информация</span></a></div><div class="lwptoc_item" style="box-sizing: border-box; margin-top: 2px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/pervaya-funktsiya/#Pervaa_funkcia_na_VBA_Excel" style="box-sizing: border-box; --linkdeco: underline; color: rgb(49, 117, 228); cursor: pointer; text-decoration: none !important; box-shadow: none !important; border: none !important;"><span class="lwptoc_item_number" style="box-sizing: border-box; margin-right: 2px;">2.</span><span> </span><span class="lwptoc_item_label" style="box-sizing: border-box;">Первая функция на VBA Excel</span></a></div><div class="lwptoc_item" style="box-sizing: border-box; margin-top: 2px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/pervaya-funktsiya/#Vstavka_funkcii_v_acejku" style="box-sizing: border-box; --linkdeco: underline; color: rgb(49, 117, 228); cursor: pointer; text-decoration: none !important; box-shadow: none !important; border: none !important;"><span class="lwptoc_item_number" style="box-sizing: border-box; margin-right: 2px;">3.</span><span> </span><span class="lwptoc_item_label" style="box-sizing: border-box;">Вставка функции в ячейку</span></a></div><div class="lwptoc_item" style="box-sizing: border-box; margin-top: 2px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/pervaya-funktsiya/#Primery_drugih_funkcij" style="box-sizing: border-box; --linkdeco: underline; color: rgb(49, 117, 228); cursor: pointer; text-decoration: none !important; box-shadow: none !important; border: none !important;"><span class="lwptoc_item_number" style="box-sizing: border-box; margin-right: 2px;">4.</span><span> </span><span class="lwptoc_item_label" style="box-sizing: border-box;">Примеры других функций</span></a><div class="lwptoc_itemWrap" style="box-sizing: border-box; margin: 2px 0px 0px 14px;"><div class="lwptoc_item" style="box-sizing: border-box; margin-top: 0px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/pervaya-funktsiya/#Plosad_kruga" style="box-sizing: border-box; --linkdeco: underline; color: rgb(49, 117, 228); cursor: pointer; text-decoration: none !important; box-shadow: none !important; border: none !important;"><span class="lwptoc_item_number" style="box-sizing: border-box; margin-right: 2px;">4.1.</span><span> </span><span class="lwptoc_item_label" style="box-sizing: border-box;">Площадь круга</span></a></div><div class="lwptoc_item" style="box-sizing: border-box; margin-top: 2px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/pervaya-funktsiya/#Plosad_treugolnika" style="box-sizing: border-box; --linkdeco: underline; color: rgb(49, 117, 228); cursor: pointer; text-decoration: none !important; box-shadow: none !important; border: none !important;"><span class="lwptoc_item_number" style="box-sizing: border-box; margin-right: 2px;">4.2.</span><span> </span><span class="lwptoc_item_label" style="box-sizing: border-box;">Площадь треугольника</span></a></div></div></div></div></div></div></div><h2 style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px; font-size: var(--h2fontsize); font-weight: var(--h2fontweight); font-family: var(--headingsfontfamily),var(--nv-fallback-ff);  letter-spacing: var(--h2letterspacing); text-transform: var(--h2texttransform);"><span id="Vvodnaa_informacia" style="box-sizing: border-box;">Вводная информация</span></h2><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Функция (Function) отличается от подпрограммы (Sub) тем, что она всегда возвращает какое-либо значение. Если функция размещается в ячейке рабочего листа, то в этой ячейке мы видим значение, которое функция возвратила.</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">В качестве примера мы создадим функцию, вычисляющую объем цилиндра по формуле: V=π*D²/4*H, где</p><div class="google-auto-placed ap_container" style="box-sizing: border-box; width: 960px; height: auto; clear: both; text-align: center;"><ins data-ad-format="auto" class="adsbygoogle adsbygoogle-noablate" data-ad-client="ca-pub-3460721053602142" data-adsbygoogle-status="done" data-ad-status="unfilled" style="box-sizing: border-box; text-decoration: none; display: block; margin: auto; background-color: transparent; height: 0px;"><div id="aswift_1_host" tabindex="0" title="Advertisement" aria-label="Advertisement" style="box-sizing: border-box; border: none; height: 0px; width: 960px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: hidden; opacity: 0;"><iframe id="aswift_1" name="aswift_1" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" width="960" height="0" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" src="https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3460721053602142&amp;output=html&amp;h=280&amp;adk=3993190223&amp;adf=1947307312&amp;pi=t.aa~a.2994879612~i.10~rp.4&amp;w=960&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1694451928&amp;num_ads=1&amp;rafmt=1&amp;armr=3&amp;sem=mc&amp;pwprc=9507011714&amp;ad_type=text_image&amp;format=960x280&amp;url=https%3A%2F%2Fvremya-ne-zhdet.ru%2Fvba-excel%2Fpervaya-funktsiya%2F&amp;fwr=0&amp;pra=3&amp;rh=200&amp;rw=960&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;fa=27&amp;uach=WyJXaW5kb3dzIiwiMTUuMC4wIiwieDg2IiwiIiwiMjMuNy40Ljk3MSIsW10sMCxudWxsLCI2NCIsW1siTm90LkEvQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjExNC4wLjU3MzUuMjg5Il0sWyJZYUJyb3dzZXIiLCIyMy43LjQuOTcxIl1dLDBd&amp;dt=1694451081732&amp;bpp=3&amp;bdt=893&amp;idt=3&amp;shv=r20230906&amp;mjsv=m202309060101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;cookie=ID%3Db9bebb71368c25f3-2201b9ef68de007a%3AT%3D1694115878%3ART%3D1694451175%3AS%3DALNI_Ma3frN0cXirUHyuAOLWfMkqZEMxuA&amp;gpic=UID%3D00000d90c82ba053%3AT%3D1694115878%3ART%3D1694451175%3AS%3DALNI_MYSu2HMUV4-wrBhZkUsdUg0v0y7zw&amp;prev_fmts=0x0&amp;nras=2&amp;correlator=832066882860&amp;frm=20&amp;pv=1&amp;ga_vid=133512174.1694115766&amp;ga_sid=1694451082&amp;ga_hid=1120377777&amp;ga_fc=1&amp;u_tz=180&amp;u_his=7&amp;u_h=864&amp;u_w=1536&amp;u_ah=816&amp;u_aw=1536&amp;u_cd=24&amp;u_sd=1.25&amp;dmc=8&amp;adx=256&amp;ady=1106&amp;biw=1471&amp;bih=716&amp;scr_x=0&amp;scr_y=0&amp;eid=44759875%2C44759837%2C44759926%2C31076838%2C20222283%2C21065725&amp;oid=2&amp;pvsid=2799803049855724&amp;tmod=1259365875&amp;uas=0&amp;nvt=1&amp;ref=https%3A%2F%2Fvremya-ne-zhdet.ru%2Fcategory%2Fvba-excel%2Fpage%2F6%2F&amp;fc=1408&amp;brdim=0%2C0%2C0%2C0%2C1536%2C0%2C0%2C0%2C1488%2C716&amp;vis=1&amp;rsz=%7C%7Cs%7C&amp;abl=NS&amp;fu=128&amp;bc=31&amp;ifi=2&amp;uci=a!2&amp;btvi=1&amp;fsb=1&amp;xpc=Ofs5CDJ9em&amp;p=https%3A//vremya-ne-zhdet.ru&amp;dtd=M" data-google-container-id="a!2" data-google-query-id="CMOjqaqFo4EDFV_DOwIdQPALbA" data-load-complete="true" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; max-width: 100%; left: 0px; position: absolute; top: 0px; width: 960px; height: 0px;"></iframe></div></ins></div><div class="blok-fon-2" style="box-sizing: border-box; width: auto; height: auto; padding: 0.4375rem; margin: 0px 0px 1.5rem; background-color: rgb(200, 251, 200);"><ul style="box-sizing: border-box; margin: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: var(--listpad,0); list-style: var(--liststyle,none);"><li style="box-sizing: border-box; margin: 10px 0px 0px; padding: 0px;">V – объем цилиндра;</li><li style="box-sizing: border-box; margin: 10px 0px 0px; padding: 0px;">π – число Pi;</li><li style="box-sizing: border-box; margin: 10px 0px 0px; padding: 0px;">D – диаметр основания цилиндра;</li><li style="box-sizing: border-box; margin: 10px 0px 0px; padding: 0px;">H – высота цилиндра.</li></ul></div><h2 style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px; font-size: var(--h2fontsize); font-weight: var(--h2fontweight); font-family: var(--headingsfontfamily),var(--nv-fallback-ff);  letter-spacing: var(--h2letterspacing); text-transform: var(--h2texttransform);"><span id="Pervaa_funkcia_na_VBA_Excel" style="box-sizing: border-box;">Первая функция на VBA Excel</span></h2><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Создайте или откройте файл Excel с расширением<span> </span><strong style="box-sizing: border-box;">.xlsm</strong><span> </span>(Книга Excel с поддержкой макросов). В версиях Excel по 2003 год – с расширением<span> </span><strong style="box-sizing: border-box;">.xls</strong>.</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Перейдите в редактор VBA, нажав сочетание клавиш «Левая_клавиша_Alt+F11».</p><div class="google-auto-placed ap_container" style="box-sizing: border-box; width: 960px; height: auto; clear: both; text-align: center;"><ins data-ad-format="auto" class="adsbygoogle adsbygoogle-noablate" data-ad-client="ca-pub-3460721053602142" data-adsbygoogle-status="done" data-ad-status="unfilled" style="box-sizing: border-box; text-decoration: none; display: block; margin: auto; background-color: transparent; height: 0px;"><div id="aswift_2_host" tabindex="0" title="Advertisement" aria-label="Advertisement" style="box-sizing: border-box; border: none; height: 0px; width: 960px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: hidden; opacity: 0;"><iframe id="aswift_2" name="aswift_2" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" width="960" height="0" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" src="https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3460721053602142&amp;output=html&amp;h=280&amp;adk=3993190223&amp;adf=1650137278&amp;pi=t.aa~a.2994879612~i.18~rp.4&amp;w=960&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1694451928&amp;num_ads=1&amp;rafmt=1&amp;armr=3&amp;sem=mc&amp;pwprc=9507011714&amp;ad_type=text_image&amp;format=960x280&amp;url=https%3A%2F%2Fvremya-ne-zhdet.ru%2Fvba-excel%2Fpervaya-funktsiya%2F&amp;fwr=0&amp;pra=3&amp;rh=200&amp;rw=960&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;fa=27&amp;uach=WyJXaW5kb3dzIiwiMTUuMC4wIiwieDg2IiwiIiwiMjMuNy40Ljk3MSIsW10sMCxudWxsLCI2NCIsW1siTm90LkEvQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjExNC4wLjU3MzUuMjg5Il0sWyJZYUJyb3dzZXIiLCIyMy43LjQuOTcxIl1dLDBd&amp;dt=1694451081743&amp;bpp=1&amp;bdt=904&amp;idt=0&amp;shv=r20230906&amp;mjsv=m202309060101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;cookie=ID%3Db9bebb71368c25f3-2201b9ef68de007a%3AT%3D1694115878%3ART%3D1694451175%3AS%3DALNI_Ma3frN0cXirUHyuAOLWfMkqZEMxuA&amp;gpic=UID%3D00000d90c82ba053%3AT%3D1694115878%3ART%3D1694451175%3AS%3DALNI_MYSu2HMUV4-wrBhZkUsdUg0v0y7zw&amp;prev_fmts=0x0%2C960x280&amp;nras=3&amp;correlator=832066882860&amp;frm=20&amp;pv=1&amp;ga_vid=133512174.1694115766&amp;ga_sid=1694451082&amp;ga_hid=1120377777&amp;ga_fc=1&amp;u_tz=180&amp;u_his=7&amp;u_h=864&amp;u_w=1536&amp;u_ah=816&amp;u_aw=1536&amp;u_cd=24&amp;u_sd=1.25&amp;dmc=8&amp;adx=256&amp;ady=1783&amp;biw=1471&amp;bih=716&amp;scr_x=0&amp;scr_y=0&amp;eid=44759875%2C44759837%2C44759926%2C31076838%2C20222283%2C21065725&amp;oid=2&amp;pvsid=2799803049855724&amp;tmod=1259365875&amp;uas=0&amp;nvt=1&amp;ref=https%3A%2F%2Fvremya-ne-zhdet.ru%2Fcategory%2Fvba-excel%2Fpage%2F6%2F&amp;fc=1408&amp;brdim=0%2C0%2C0%2C0%2C1536%2C0%2C0%2C0%2C1488%2C716&amp;vis=1&amp;rsz=%7C%7Cs%7C&amp;abl=NS&amp;fu=128&amp;bc=31&amp;ifi=3&amp;uci=a!3&amp;btvi=2&amp;fsb=1&amp;xpc=1AyhfvUTd9&amp;p=https%3A//vremya-ne-zhdet.ru&amp;dtd=M" data-google-container-id="a!3" data-google-query-id="CJrMqqqFo4EDFT3OOwIdpXoLWQ" data-load-complete="true" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; max-width: 100%; left: 0px; position: absolute; top: 0px; width: 960px; height: 0px;"></iframe></div></ins></div><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Если вы не создавали ранее в этом проекте VBA стандартный программный<span> </span><a href="https://vremya-ne-zhdet.ru/vba-excel/modul-protsedura-forma/" style="box-sizing: border-box; --linkdeco: underline; color: var(--nv-primary-accent); cursor: pointer; text-decoration: var(--linkdeco);">модуль</a>, нажмите кнопку «Module» во вкладке «Insert» главного меню. То же подменю откроется при нажатии на вторую кнопку после значка Excel на панели инструментов.</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;"></p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Ссылка на модуль появится в проводнике слева. Если модуль создан ранее, дважды кликните по его ссылке в проводнике, и он откроется справа для редактирования.</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Нажмите кнопку «Procedure…» во вкладке «Insert» главного меню. Та же ссылка будет доступна при нажатии на вторую кнопку после значка Excel на панели инструментов.</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;"></p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">В открывшемся окне добавления шаблона процедуры выберите «Function», вставьте в поле «Name» название функции «ObyemTsilindra» и нажмите «OK».</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;"></p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Шаблон функции добавится на лист модуля.</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;"></p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Вставьте в скобки через запятую аргументы функции (D, H), а внутрь шаблона следующую строку:</p><div id="urvanov-syntax-highlighter-64ff458866ecb335002909" class="urvanov-syntax-highlighter-syntax crayon-theme-classic urvanov-syntax-highlighter-font-verdana urvanov-syntax-highlighter-os-pc print-yes notranslate" data-settings=" no-popup minimize scroll-always" style="box-sizing: border-box; text-align: left; text-size-adjust: none; overflow: hidden !important; position: relative !important; direction: ltr !important; width: 960px; padding: 0px; margin: 12px 0px; font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace; font-weight: 500; border-width: 1px !important; border-color: rgb(153, 153, 153) !important; border-style: solid !important; text-shadow: none !important; background: rgb(253, 253, 253) !important; font-size: 12px !important;  height: auto;"><div class="urvanov-syntax-highlighter-plain-wrap" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; background: 0px center; border: 0px; padding: 0px !important; margin: 0px !important; text-align: left; height: auto !important;"></div><div class="urvanov-syntax-highlighter-main" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; background: 0px center; border: 0px; padding: 0px; margin: 0px; text-align: left; width: 958.4px; overflow: auto; position: relative; z-index: 1;"><table class="crayon-table" style="box-sizing: border-box; border-collapse: collapse !important; border-spacing: 0px !important; border: none !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px; width: auto !important; word-break: initial; font-family: Verdana, Arial, sans !important; padding: 0px !important; background: none !important; table-layout: auto !important;"><tbody style="box-sizing: border-box; font-family: Verdana, Arial, sans !important;"><tr class="urvanov-syntax-highlighter-row" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; padding: 0px !important; border: none !important; background: none !important; vertical-align: top !important; margin: 0px !important;"><td class="crayon-nums " data-settings="show" style="box-sizing: border-box; padding: 0px !important; text-align: left; font-size: 0.9em; border: none !important; background: rgb(223, 239, 255) !important; font-family: Verdana, Arial, sans !important; user-select: none; vertical-align: top !important; margin: 0px !important; color: rgb(84, 153, 222) !important;"><div class="urvanov-syntax-highlighter-nums-content" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; background: 0px center; border: 0px; padding: 0px; margin: 0px; text-align: left; white-space: nowrap; font-size: 12px !important; "><div class="crayon-num" data-line="urvanov-syntax-highlighter-64ff458866ecb335002909-1" style="box-sizing: border-box; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important;  font-weight: inherit !important;">1</div></div></td><td class="urvanov-syntax-highlighter-code" style="box-sizing: border-box; padding: 0px !important; text-align: left; font-size: 0.9em; border: none !important; background: none !important; font-family: Verdana, Arial, sans !important; width: 940.763px; vertical-align: top !important; margin: 0px !important;"><div class="crayon-pre" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; background: none !important; border: none !important; padding: 0px; margin: 0px; text-align: left; color: rgb(0, 0, 0); white-space: pre; overflow: visible; tab-size: 4; font-size: 12px !important; "><div class="crayon-line" id="urvanov-syntax-highlighter-64ff458866ecb335002909-1" style="box-sizing: border-box; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: left; height: inherit; font-size: inherit !important;  font-weight: inherit !important;"><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">ObyemTsilindra</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">WorksheetFunction</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(51, 51, 51) !important;">.</span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">Pi</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">*</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">D</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">^</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-cn" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(206, 0, 0) !important;">2</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">/</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-cn" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(206, 0, 0) !important;">4</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">*</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">H</span></div></div></td></tr></tbody></table></div></div><div class="google-auto-placed ap_container" style="box-sizing: border-box; width: 960px; height: auto; clear: both; text-align: center;"><ins data-ad-format="auto" class="adsbygoogle adsbygoogle-noablate" data-ad-client="ca-pub-3460721053602142" data-adsbygoogle-status="done" data-ad-status="unfilled" style="box-sizing: border-box; text-decoration: none; display: block; margin: auto; background-color: transparent; height: 0px;"><div id="aswift_3_host" tabindex="0" title="Advertisement" aria-label="Advertisement" style="box-sizing: border-box; border: none; height: 0px; width: 960px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: hidden; opacity: 0;"><iframe id="aswift_3" name="aswift_3" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" width="960" height="0" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" src="https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3460721053602142&amp;output=html&amp;h=280&amp;adk=3993190223&amp;adf=2971066751&amp;pi=t.aa~a.2994879612~i.45~rp.4&amp;w=960&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1694451931&amp;num_ads=1&amp;rafmt=1&amp;armr=3&amp;sem=mc&amp;pwprc=9507011714&amp;ad_type=text_image&amp;format=960x280&amp;url=https%3A%2F%2Fvremya-ne-zhdet.ru%2Fvba-excel%2Fpervaya-funktsiya%2F&amp;fwr=0&amp;pra=3&amp;rh=200&amp;rw=960&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;fa=27&amp;uach=WyJXaW5kb3dzIiwiMTUuMC4wIiwieDg2IiwiIiwiMjMuNy40Ljk3MSIsW10sMCxudWxsLCI2NCIsW1siTm90LkEvQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjExNC4wLjU3MzUuMjg5Il0sWyJZYUJyb3dzZXIiLCIyMy43LjQuOTcxIl1dLDBd&amp;dt=1694451081752&amp;bpp=1&amp;bdt=913&amp;idt=1&amp;shv=r20230906&amp;mjsv=m202309060101&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;cookie=ID%3Db9bebb71368c25f3-2201b9ef68de007a%3AT%3D1694115878%3ART%3D1694451175%3AS%3DALNI_Ma3frN0cXirUHyuAOLWfMkqZEMxuA&amp;gpic=UID%3D00000d90c82ba053%3AT%3D1694115878%3ART%3D1694451175%3AS%3DALNI_MYSu2HMUV4-wrBhZkUsdUg0v0y7zw&amp;prev_fmts=0x0%2C960x280%2C960x280&amp;nras=4&amp;correlator=832066882860&amp;frm=20&amp;pv=1&amp;ga_vid=133512174.1694115766&amp;ga_sid=1694451082&amp;ga_hid=1120377777&amp;ga_fc=1&amp;u_tz=180&amp;u_his=7&amp;u_h=864&amp;u_w=1536&amp;u_ah=816&amp;u_aw=1536&amp;u_cd=24&amp;u_sd=1.25&amp;dmc=8&amp;adx=256&amp;ady=3119&amp;biw=1471&amp;bih=716&amp;scr_x=0&amp;scr_y=306&amp;eid=44759875%2C44759837%2C44759926%2C31076838%2C20222283%2C21065725&amp;oid=2&amp;pvsid=2799803049855724&amp;tmod=1259365875&amp;uas=0&amp;nvt=1&amp;ref=https%3A%2F%2Fvremya-ne-zhdet.ru%2Fcategory%2Fvba-excel%2Fpage%2F6%2F&amp;fc=1408&amp;brdim=0%2C0%2C0%2C0%2C1536%2C0%2C1536%2C816%2C1488%2C716&amp;vis=1&amp;rsz=%7C%7Cs%7C&amp;abl=NS&amp;fu=128&amp;bc=31&amp;ifi=4&amp;uci=a!4&amp;btvi=3&amp;fsb=1&amp;xpc=gEaj70pn69&amp;p=https%3A//vremya-ne-zhdet.ru&amp;dtd=M" data-google-container-id="a!4" data-google-query-id="CL-LxauFo4EDFQ6gmgodVuwPIA" data-load-complete="true" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; max-width: 100%; left: 0px; position: absolute; top: 0px; width: 960px; height: 0px;"></iframe></div></ins></div><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">В этой строке, функции (слева) присваивается значение, вычисленное в выражении справа. Выражение повторяет нашу первоначальную формулу вычисления объема цилиндра, где «WorksheetFunction.Pi» – это функция рабочего листа, возвращающая число Pi.</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;"></p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Функция, вычисляющая объем цилиндра по диаметру основания и высоте готова.</p><h2 style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px; font-size: var(--h2fontsize); font-weight: var(--h2fontweight); font-family: var(--headingsfontfamily),var(--nv-fallback-ff);  letter-spacing: var(--h2letterspacing); text-transform: var(--h2texttransform);"><span id="Vstavka_funkcii_v_acejku" style="box-sizing: border-box;">Вставка функции в ячейку</span></h2><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Вставить пользовательскую функцию в ячейку можно как вручную:<span> </span><strong style="box-sizing: border-box;"><code style="box-sizing: border-box; background: rgb(208, 239, 251); border-radius: 5px; border: 1px solid var(--nv-light-bg); padding: 0px 3px; color: rgb(51, 51, 51);">=ObyemTsilindra(Ячейка1;Ячейка2)</code></strong>, так и с помощью мастера функций.</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Выберите ячейку, в которую вы хотите вставить формулу, и вызовите матер функций.</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;"></p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">В открывшемся окне «Вставка функции» выберите категорию «Определенные пользователем», а в открывшемся списке – функцию «ObyemTsilindra» и нажмите «OK».</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;"></p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">В окне «Аргументы функции» в полях аргументов выберите соответствующие ячейки, кликнув по ним на рабочем листе, и нажмите «OK».</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;"></p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Обращаться с<span> </span><a href="https://vremya-ne-zhdet.ru/vba-excel/polzovatelskaya-funktsiya/" style="box-sizing: border-box; --linkdeco: underline; color: var(--nv-primary-accent); cursor: pointer; text-decoration: var(--linkdeco);">пользовательской функцией</a><span> </span>на рабочем листе можно так же, как с любой другой формулой, например, копировать протягиванием.</p><h2 style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px; font-size: var(--h2fontsize); font-weight: var(--h2fontweight); font-family: var(--headingsfontfamily),var(--nv-fallback-ff);  letter-spacing: var(--h2letterspacing); text-transform: var(--h2texttransform);"><span id="Primery_drugih_funkcij" style="box-sizing: border-box;">Примеры других функций</span></h2><h3 style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px; font-size: var(--h3fontsize); font-weight: var(--h3fontweight); font-family: var(--headingsfontfamily),var(--nv-fallback-ff);  letter-spacing: var(--h3letterspacing); text-transform: var(--h3texttransform);"><span id="Plosad_kruga" style="box-sizing: border-box;">Площадь круга</span></h3><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Формула: S=π*r²</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Код функции:</p><div id="urvanov-syntax-highlighter-64ff458866ef1000392350" class="urvanov-syntax-highlighter-syntax crayon-theme-classic urvanov-syntax-highlighter-font-verdana urvanov-syntax-highlighter-os-pc print-yes notranslate" data-settings=" no-popup minimize scroll-always" style="box-sizing: border-box; text-align: left; text-size-adjust: none; overflow: hidden !important; position: relative !important; direction: ltr !important; width: 960px; padding: 0px; margin: 12px 0px; font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace; font-weight: 500; border-width: 1px !important; border-color: rgb(153, 153, 153) !important; border-style: solid !important; text-shadow: none !important; background: rgb(253, 253, 253) !important; font-size: 12px !important;  height: auto;"><div class="urvanov-syntax-highlighter-plain-wrap" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; background: 0px center; border: 0px; padding: 0px !important; margin: 0px !important; text-align: left; height: auto !important;"></div><div class="urvanov-syntax-highlighter-main" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; background: 0px center; border: 0px; padding: 0px; margin: 0px; text-align: left; width: 958.4px; overflow: auto; position: relative; z-index: 1;"><table class="crayon-table" style="box-sizing: border-box; border-collapse: collapse !important; border-spacing: 0px !important; border: none !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px; width: auto !important; word-break: initial; font-family: Verdana, Arial, sans !important; padding: 0px !important; background: none !important; table-layout: auto !important;"><tbody style="box-sizing: border-box; font-family: Verdana, Arial, sans !important;"><tr class="urvanov-syntax-highlighter-row" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; padding: 0px !important; border: none !important; background: none !important; vertical-align: top !important; margin: 0px !important;"><td class="crayon-nums " data-settings="show" style="box-sizing: border-box; padding: 0px !important; text-align: left; font-size: 0.9em; border: none !important; background: rgb(223, 239, 255) !important; font-family: Verdana, Arial, sans !important; user-select: none; vertical-align: top !important; margin: 0px !important; color: rgb(84, 153, 222) !important;"><div class="urvanov-syntax-highlighter-nums-content" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; background: 0px center; border: 0px; padding: 0px; margin: 0px; text-align: left; white-space: nowrap; font-size: 12px !important; "><div class="crayon-num" data-line="urvanov-syntax-highlighter-64ff458866ef1000392350-1" style="box-sizing: border-box; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important;  font-weight: inherit !important;">1</div><div class="crayon-num crayon-striped-num" data-line="urvanov-syntax-highlighter-64ff458866ef1000392350-2" style="box-sizing: border-box; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(49, 124, 197) !important;">2</div><div class="crayon-num" data-line="urvanov-syntax-highlighter-64ff458866ef1000392350-3" style="box-sizing: border-box; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important;  font-weight: inherit !important;">3</div></div></td><td class="urvanov-syntax-highlighter-code" style="box-sizing: border-box; padding: 0px !important; text-align: left; font-size: 0.9em; border: none !important; background: none !important; font-family: Verdana, Arial, sans !important; width: 940.763px; vertical-align: top !important; margin: 0px !important;"><div class="crayon-pre" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; background: none !important; border: none !important; padding: 0px; margin: 0px; text-align: left; color: rgb(0, 0, 0); white-space: pre; overflow: visible; tab-size: 4; font-size: 12px !important; "><div class="crayon-line" id="urvanov-syntax-highlighter-64ff458866ef1000392350-1" style="box-sizing: border-box; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: left; height: inherit; font-size: inherit !important;  font-weight: inherit !important;"><span class="crayon-m" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(128, 0, 128) !important;">Public</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-t" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(128, 0, 128) !important;">Function</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 78, 208) !important;">S_Kruga</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(51, 51, 51) !important;">(</span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">r</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(51, 51, 51) !important;">)</span></div><div class="crayon-line crayon-striped-line" id="urvanov-syntax-highlighter-64ff458866ef1000392350-2" style="box-sizing: border-box; font-family: inherit; background: rgb(247, 247, 247) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: left; height: inherit; font-size: inherit !important;  font-weight: inherit !important;"><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">    </span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">S_Kruga</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">WorksheetFunction</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(51, 51, 51) !important;">.</span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">Pi</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">*</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">r</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">^</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-cn" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(206, 0, 0) !important;">2</span></div><div class="crayon-line" id="urvanov-syntax-highlighter-64ff458866ef1000392350-3" style="box-sizing: border-box; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: left; height: inherit; font-size: inherit !important;  font-weight: inherit !important;"><span class="crayon-st" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(128, 0, 128) !important;">End</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-t" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(128, 0, 128) !important;">Function</span></div></div></td></tr></tbody></table></div></div><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Результат:</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;"></p><h3 style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px; font-size: var(--h3fontsize); font-weight: var(--h3fontweight); font-family: var(--headingsfontfamily),var(--nv-fallback-ff);  letter-spacing: var(--h3letterspacing); text-transform: var(--h3texttransform);"><span id="Plosad_treugolnika" style="box-sizing: border-box;">Площадь треугольника</span></h3><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Формула: S=a*h/2</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Код функции:</p><div id="urvanov-syntax-highlighter-64ff458866ef8875824632" class="urvanov-syntax-highlighter-syntax crayon-theme-classic urvanov-syntax-highlighter-font-verdana urvanov-syntax-highlighter-os-pc print-yes notranslate" data-settings=" no-popup minimize scroll-always" style="box-sizing: border-box; text-align: left; text-size-adjust: none; overflow: hidden !important; position: relative !important; direction: ltr !important; width: 960px; padding: 0px; margin: 12px 0px; font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace; font-weight: 500; border-width: 1px !important; border-color: rgb(153, 153, 153) !important; border-style: solid !important; text-shadow: none !important; background: rgb(253, 253, 253) !important; font-size: 12px !important;  height: auto;"><div class="urvanov-syntax-highlighter-plain-wrap" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; background: 0px center; border: 0px; padding: 0px !important; margin: 0px !important; text-align: left; height: auto !important;"></div><div class="urvanov-syntax-highlighter-main" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; background: 0px center; border: 0px; padding: 0px; margin: 0px; text-align: left; width: 958.4px; overflow: auto; position: relative; z-index: 1;"><table class="crayon-table" style="box-sizing: border-box; border-collapse: collapse !important; border-spacing: 0px !important; border: none !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px; width: auto !important; word-break: initial; font-family: Verdana, Arial, sans !important; padding: 0px !important; background: none !important; table-layout: auto !important;"><tbody style="box-sizing: border-box; font-family: Verdana, Arial, sans !important;"><tr class="urvanov-syntax-highlighter-row" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; padding: 0px !important; border: none !important; background: none !important; vertical-align: top !important; margin: 0px !important;"><td class="crayon-nums " data-settings="show" style="box-sizing: border-box; padding: 0px !important; text-align: left; font-size: 0.9em; border: none !important; background: rgb(223, 239, 255) !important; font-family: Verdana, Arial, sans !important; user-select: none; vertical-align: top !important; margin: 0px !important; color: rgb(84, 153, 222) !important;"><div class="urvanov-syntax-highlighter-nums-content" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; background: 0px center; border: 0px; padding: 0px; margin: 0px; text-align: left; white-space: nowrap; font-size: 12px !important; "><div class="crayon-num" data-line="urvanov-syntax-highlighter-64ff458866ef8875824632-1" style="box-sizing: border-box; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important;  font-weight: inherit !important;">1</div><div class="crayon-num crayon-striped-num" data-line="urvanov-syntax-highlighter-64ff458866ef8875824632-2" style="box-sizing: border-box; font-family: inherit; background: rgb(200, 225, 250) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(49, 124, 197) !important;">2</div><div class="crayon-num" data-line="urvanov-syntax-highlighter-64ff458866ef8875824632-3" style="box-sizing: border-box; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: inherit; font-size: inherit !important;  font-weight: inherit !important;">3</div></div></td><td class="urvanov-syntax-highlighter-code" style="box-sizing: border-box; padding: 0px !important; text-align: left; font-size: 0.9em; border: none !important; background: none !important; font-family: Verdana, Arial, sans !important; width: 940.763px; vertical-align: top !important; margin: 0px !important;"><div class="crayon-pre" style="box-sizing: border-box; font-family: Verdana, Arial, sans !important; background: none !important; border: none !important; padding: 0px; margin: 0px; text-align: left; color: rgb(0, 0, 0); white-space: pre; overflow: visible; tab-size: 4; font-size: 12px !important; "><div class="crayon-line" id="urvanov-syntax-highlighter-64ff458866ef8875824632-1" style="box-sizing: border-box; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: left; height: inherit; font-size: inherit !important;  font-weight: inherit !important;"><span class="crayon-m" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(128, 0, 128) !important;">Public</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-t" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(128, 0, 128) !important;">Function</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 78, 208) !important;">S_Treugolnika</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(51, 51, 51) !important;">(</span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">a</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(51, 51, 51) !important;">,</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">h</span><span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(51, 51, 51) !important;">)</span></div><div class="crayon-line crayon-striped-line" id="urvanov-syntax-highlighter-64ff458866ef8875824632-2" style="box-sizing: border-box; font-family: inherit; background: rgb(247, 247, 247) !important; border: 0px; padding: 0px 5px; margin: 0px; text-align: left; height: inherit; font-size: inherit !important;  font-weight: inherit !important;"><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">    </span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">S_Treugolnika</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">a</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">*</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 45, 122) !important;">h</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;">/</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-cn" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(206, 0, 0) !important;">2</span></div><div class="crayon-line" id="urvanov-syntax-highlighter-64ff458866ef8875824632-3" style="box-sizing: border-box; font-family: inherit; background: 0px center; border: 0px; padding: 0px 5px; margin: 0px; text-align: left; height: inherit; font-size: inherit !important;  font-weight: inherit !important;"><span class="crayon-st" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(128, 0, 128) !important;">End</span><span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span><span class="crayon-t" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important;  font-weight: inherit !important; color: rgb(128, 0, 128) !important;">Function</span></div></div></td></tr></tbody></table></div></div><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;">Результат:</p><p style="box-sizing: border-box; margin: 0px 0px 30px; padding: 0px;"></p><hr style="box-sizing: border-box; margin: 10px 0px 20px; padding: 0px; color: inherit; height: 0px; border-width: 2px 0px 0px; border-right-style: initial; border-bottom-style: initial; border-left-style: initial; border-color: initial; border-image: initial; border-top-style: solid; display: inline-block; width: 960px;"><div class="blok-fon-3" style="box-sizing: border-box; width: auto; height: auto; padding: 0.4375rem; margin: 0px 0px 1.5rem; background-color: rgb(230, 230, 250);"><a href="https://vremya-ne-zhdet.ru/vba-excel/soderzhaniye-rubriki/" style="box-sizing: border-box; --linkdeco: underline; color: var(--nv-primary-accent); cursor: pointer; text-decoration: var(--linkdeco);">Содержание рубрики VBA Excel</a><span> </span>по тематическим разделам со ссылками на все статьи.</div></div>
</body>
</html></p></body></html>